package main

import "fmt"

func main() {
	fmt.Println(findTargetIn2DPlants([][]int{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, 5))
}
func findTargetIn2DPlants(plants [][]int, target int) bool {
	for i := len(plants) - 1; i >= 0; i-- {
		for j := len(plants[i]) - 1; j >= 0; j-- {
			if plants[i][j] == target {
				return true
			} else {
				if plants[i][j] < target {
					break
				}
			}
		}
	}
	return false
}
